<?php
namespace Admin\Controller;
use Think\Controller;
class UserController extends Controller {
    public $User;
    public $Jieshu;
    public function __construct() {
        parent::__construct();
        $this->Jieshu = M('jieshu');
        $this->User = M('user');
    }


    public function alllist() {          
         $user = $this->User->select();
         $this->assign('user',$user);
         $this->display();
    }

    public function alllist2() {
        $aid = $_GET['aid'];
		
		$date['id'] = $aid;
		$user = $this->User->where($date)->find();
		$this->assign('yonghu', $user['yonghuname']);
        $data['aid'] = $aid;
        $prson = M('person')->where($data)->select();
        $this->assign('ren', $prson);
		
		if(!$prson){
			$this->assign('info','此用户没有设置完整的资料V_V');
		}
		
        $this->display();

    }
   
    Public function weihuanuser() {
         $data['zhuangtai'] = 1;
         $jieshu = $this->Jieshu->where($data)->select();
         $this->assign('user',$jieshu);
         $this->display();
    } 

    Public function book(){
        $bookid = $_GET['id'];
        $data['id'] = $bookid;
        $book = M('addbook')->where($data)->select();
        $this->assign('book',$book);
        $this->display();
    }

    Public function yuyue() {
         $data['zhuangtai'] = 0;
         $jieshu = $this->Jieshu->where($data)->select();
         $this->assign('user',$jieshu);
         $this->display();
    }

}
